DeferUserFn
DeferUserFn Can code that might cause page faults be called safely? Debugger Support Under Virtual Memory
ProcPtr userFunction is the address of a routine void *argument specifies a pointer to the argument to pass
You can use the DeferUserFn function to determine whether code that might cause page faults can safely be called immediately. If the code can be called
safely, then it is called. If a page fault is in progress, however, the routine
address and its parameter are saved, and the routine is deferred until page
faults are again permitted.
userFunction is the address of the routine that you want to run
argument is a pointer to the argument to pass to the specified
routine.
noErr (0) No error
cannotDeferErr (-625) Unable to defer additional user functions
Notes: The specified routine is called with register A0 containing the value of the
argument parameter to the DeferUserFn call. Note that the routine can be called immediately (before returning to the caller of DeferUserFn). Deferred functions must follow the register conventions used by interrupt
handlers: they may use registers A0-A3 and D0-D3, and must restore all
other registers used.